package cn.bellychang.ood.ocp.good;

/**
 * @author ChangLiang
 * @date 2020/5/12
 */
public class Logger {

    private Appender appender;
    private Formatter formatter;

    public Logger(Appender appender, Formatter formatter) {
        this.appender = appender;
        this.formatter = formatter;
    }

    public void log(String msg) {
        appender.send(formatter.format(msg));
    }
}
